package com.shop.entity;

// Generated 2015-10-7 22:59:34 by Hibernate Tools 4.0.0

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Shipping generated by hbm2java
 */
@Entity
@Table(name = "shipping", catalog = "shop")
public class Shipping implements java.io.Serializable {

	private Integer shipId;
	private String shipName;
	private String shipUuid;
	private String shipRegion;
	private BigDecimal shipFirstunit;
	private BigDecimal shipFirstprice;
	private BigDecimal shipContinueunit;
	private BigDecimal shipContiuneprice;
	private String shipType;
	private String shipDetail;
	private boolean shipStatus;
	private Date shipDate;
	private Set<Tempalte> tempaltes = new HashSet<Tempalte>(0);

	public Shipping() {
	}

	public Shipping(String shipName, String shipUuid, String shipRegion,
			BigDecimal shipFirstunit, BigDecimal shipFirstprice,
			BigDecimal shipContinueunit, BigDecimal shipContiuneprice,
			boolean shipStatus, Date shipDate) {
		this.shipName = shipName;
		this.shipUuid = shipUuid;
		this.shipRegion = shipRegion;
		this.shipFirstunit = shipFirstunit;
		this.shipFirstprice = shipFirstprice;
		this.shipContinueunit = shipContinueunit;
		this.shipContiuneprice = shipContiuneprice;
		this.shipStatus = shipStatus;
		this.shipDate = shipDate;
	}

	public Shipping(String shipName, String shipUuid, String shipRegion,
			BigDecimal shipFirstunit, BigDecimal shipFirstprice,
			BigDecimal shipContinueunit, BigDecimal shipContiuneprice,
			String shipType, String shipDetail, boolean shipStatus,
			Date shipDate, Set<Tempalte> tempaltes) {
		this.shipName = shipName;
		this.shipUuid = shipUuid;
		this.shipRegion = shipRegion;
		this.shipFirstunit = shipFirstunit;
		this.shipFirstprice = shipFirstprice;
		this.shipContinueunit = shipContinueunit;
		this.shipContiuneprice = shipContiuneprice;
		this.shipType = shipType;
		this.shipDetail = shipDetail;
		this.shipStatus = shipStatus;
		this.shipDate = shipDate;
		this.tempaltes = tempaltes;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ship_id", unique = true, nullable = false)
	public Integer getShipId() {
		return this.shipId;
	}

	public void setShipId(Integer shipId) {
		this.shipId = shipId;
	}

	@Column(name = "ship_name", nullable = false)
	public String getShipName() {
		return this.shipName;
	}

	public void setShipName(String shipName) {
		this.shipName = shipName;
	}

	@Column(name = "ship_uuid", nullable = false, length = 32)
	public String getShipUuid() {
		return this.shipUuid;
	}

	public void setShipUuid(String shipUuid) {
		this.shipUuid = shipUuid;
	}

	@Column(name = "ship_region", nullable = false, length = 106)
	public String getShipRegion() {
		return this.shipRegion;
	}

	public void setShipRegion(String shipRegion) {
		this.shipRegion = shipRegion;
	}

	@Column(name = "ship_firstunit", nullable = false, precision = 7)
	public BigDecimal getShipFirstunit() {
		return this.shipFirstunit;
	}

	public void setShipFirstunit(BigDecimal shipFirstunit) {
		this.shipFirstunit = shipFirstunit;
	}

	@Column(name = "ship_firstprice", nullable = false, precision = 7)
	public BigDecimal getShipFirstprice() {
		return this.shipFirstprice;
	}

	public void setShipFirstprice(BigDecimal shipFirstprice) {
		this.shipFirstprice = shipFirstprice;
	}

	@Column(name = "ship_continueunit", nullable = false, precision = 7)
	public BigDecimal getShipContinueunit() {
		return this.shipContinueunit;
	}

	public void setShipContinueunit(BigDecimal shipContinueunit) {
		this.shipContinueunit = shipContinueunit;
	}

	@Column(name = "ship_contiuneprice", nullable = false, precision = 7)
	public BigDecimal getShipContiuneprice() {
		return this.shipContiuneprice;
	}

	public void setShipContiuneprice(BigDecimal shipContiuneprice) {
		this.shipContiuneprice = shipContiuneprice;
	}

	@Column(name = "ship_type", length = 3)
	public String getShipType() {
		return this.shipType;
	}

	public void setShipType(String shipType) {
		this.shipType = shipType;
	}

	@Column(name = "ship_detail", length = 500)
	public String getShipDetail() {
		return this.shipDetail;
	}

	public void setShipDetail(String shipDetail) {
		this.shipDetail = shipDetail;
	}

	@Column(name = "ship_status", nullable = false)
	public boolean isShipStatus() {
		return this.shipStatus;
	}

	public void setShipStatus(boolean shipStatus) {
		this.shipStatus = shipStatus;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "ship_date", nullable = false, length = 19)
	public Date getShipDate() {
		return this.shipDate;
	}

	public void setShipDate(Date shipDate) {
		this.shipDate = shipDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "shipping")
	public Set<Tempalte> getTempaltes() {
		return this.tempaltes;
	}

	public void setTempaltes(Set<Tempalte> tempaltes) {
		this.tempaltes = tempaltes;
	}

}
